home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MACD 5
/
MACD 5.bin
/
workbench
/
libs
/
unixlib.lha
/
unix
/
test
/
popen_r_test.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-09-06
|
276b
|
20 lines
#include <stdio.h>
int main(void)
{
int c;
int first = 1;
FILE *fp = popen("io_test", "r");
printf("This is the child output:");
while ((c = getc(fp)) != EOF) {
if (first) {
printf("\n");
first = 0;
}
printf("%4d %c\n", c, c);
}
pclose(fp);
return(0);
}